package main;

import java.util.Calendar;

/**
 * This the main data transfer object that the DAO accept in order
 * to insert data into the database.
 * 
 * This is just a container object to store and pass data throughout
 * the application.  Mainly used with the DAOs.
 * @author Brad
 *
 */
public class DataTransferObject {

	//User Table data
	private String userName;
	private int userID;
	
	//Location Table data
	private String ip;
	private int locID;
	private String country;
	
	private String city;
	private String areaCode;
	
	//Algorithm Table data
	private String algorithmName;
	private int algID;
	
	//Accesses Table data
	private Calendar time;
	
	
	//Constructors
	public DataTransferObject(){
		
	}
	public DataTransferObject(String username, String ip, String algorithmName, Calendar timestamp){
		userName = username;
		this.ip = ip;
		this.algorithmName = algorithmName;
		time = timestamp;
	}
	public DataTransferObject(String username, String ip, String algorithmName){
		userName = username;
		this.ip = ip;
		this.algorithmName = algorithmName;
		time = Calendar.getInstance();		//Gets current time of constructor
	}
	
	
	//Getters-Setters
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	public String getIp() {
		return ip;
	}
	public void setIp(String ip) {
		this.ip = ip;
	}
	public String getAlgorithmName() {
		return algorithmName;
	}
	public void setAlgorithmName(String algorithmName) {
		this.algorithmName = algorithmName;
	}
	public Calendar getTime() {
		return time;
	}
	public void setTime(Calendar time) {
		this.time = time;
	}
	public int getUserID() {
		return userID;
	}

	public void setUserID(int userID) {
		this.userID = userID;
	}

	public int getLocID() {
		return locID;
	}

	public void setLocID(int locID) {
		this.locID = locID;
	}

	public String getCountry() {
		return country;
	}

	public void setCountry(String country) {
		this.country = country;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getAreaCode() {
		return areaCode;
	}

	public void setAreaCode(String areaCode) {
		this.areaCode = areaCode;
	}

	public int getAlgID() {
		return algID;
	}

	public void setAlgID(int algID) {
		this.algID = algID;
	}
}
